<div class="panel panel-default">
	<div class="panel-heading newsfeed">
		<p>Chatbox</p>
	</div>
	<div class="panel-body mail">
		<div class="row">
			<div class="col-sm-3 col-md-3">
				<!--<a href="#" class="btn btn-danger btn-sm btn-block" role="button">COMPOSE</a>-->
			</div>
			<div class="col-sm-9 col-md-9">
				<!-- /input-group -->
				<!-- Split button -->
				<div class="btn-group">
					<span class="btn btn-default">
						<input type="checkbox" onClick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" />
					</span>  
					
				</div>
				<button type="button" class="btn btn-primary">
					Back
				</button>
				<!-- Single button -->
				
				<button type="button" class="btn btn-danger delete">
					Delete
				</button>
				<div class="pull-right">
					<span class="text-muted"><b>1</b>–<b>50</b> of <b>277</b></span>
					<div class="btn-group btn-group-sm">
						<button type="button" class="btn btn-default">
							<span class="glyphicon glyphicon-chevron-left"></span>
						</button>
						<button type="button" class="btn btn-default">
							<span class="glyphicon glyphicon-chevron-right"></span>
						</button>
					</div>
				</div>
				
			</div>
		</div>
		<hr />
		<div class="row">
			<div class="col-sm-3 col-md-3">
				<?php echo $this->template->widget("cms_appmenu_widget", array("menu_name"=>"mail_menu"));?>
			</div>
			<div class="col-sm-9 col-md-9">
				<!-- Nav tabs -->
				<ul class="nav nav-tabs">
					<li class="active"><a href="#home" data-toggle="tab"><span class="glyphicon glyphicon-inbox">
					</span>Chat</a>
					</li>
					
				</ul>
				<!-- Tab panes -->
				<div class="tab-content">
					<div class="tab-pane fade in active" id="home">
						<?php echo form_open(null, 'id="inboxform"'); ?>
						<div class="list-group">
							<?php foreach($chatbox as $inbox){
							?>
							
							<a href="<?php echo base_url('users/chatdetails/'.$inbox['fromid'])?>" class="list-group-item">
								<div class="checkbox">
									<label>
										<input type="checkbox" value="<?php echo $inbox['fromid'] ?>" name="selected[]" />
									</label>
								</div>
								<span class="name current" style="min-width: 120px;display: inline-block;"><?=$inbox['firstname']?></span>
								<span class="msg current"><?php echo substr(strip_tags(stripslashes($inbox['message'])), 0, 50) . '..'; ?></span>
								<span class="badge"><?=date('m/d/Y h:i A', strtotime($inbox['sent']));?></span>  
									
							</a>
							<?}?>
							
						</div>
						<?php echo form_close(); ?>
					</div>
					<div class="tab-pane fade in" id="profile">
						<div class="list-group">
							<div class="list-group-item">
								<span class="text-center">This tab is empty.</span>
							</div>
						</div>
					</div>
					<div class="tab-pane fade in" id="messages">
						...</div>
					<div class="tab-pane fade in" id="settings">
						This tab is empty.</div>
				</div>
			</div>
		</div>
	</div>
</div>

  
